home *** CD-ROM | disk | FTP | other *** search
/ Atari Mega Archive 1 / Atari Mega Archive - Volume 1.iso / lists / mint / l_1599 / 1400 < prev    next >
Encoding:
Internet Message Format  |  1994-08-27  |  1.4 KB

  1. From: Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
  2. Date: Tue, 17 May 94 11:49:50 +0200
  3. Message-Id: <9405170949.AA04469@issan.informatik.uni-dortmund.de>
  4. To: mint@atari.archive.umich.edu
  5. Subject: MiNT 1.10: bug in p_waitpid
  6.  
  7. When a process exits both its own and its children's process time
  8. should be added to the parent's children time.  Also the time reported
  9. as resource usage should include the children's time.
  10.  
  11. --- orig/dosmem.c    Wed Feb  2 23:43:02 1994
  12. +++ dosmem.c    Mon May 16 19:28:48 1994
  13. @@ -1094,16 +1094,16 @@
  14.  
  15.  /* check resource usage */
  16.      if (rusage) {
  17. -        *rusage++ = p->usrtime;
  18. -        *rusage = p->systime;
  19. +        *rusage++ = p->usrtime + p->chldutime;
  20. +        *rusage = p->systime + p->chldstime;
  21.      }
  22.  
  23.  /* avoid adding adopted trace processes usage to the foster parent */
  24.      if (curproc->pid == p->ppid) {
  25.      /* add child's resource usage to parent's */
  26.          if (p->wait_q == TSR_Q || p->wait_q == ZOMBIE_Q) {
  27. -            curproc->chldstime += p->systime;
  28. -            curproc->chldutime += p->usrtime;
  29. +            curproc->chldstime += p->systime + p->chldstime;
  30. +            curproc->chldutime += p->usrtime + p->chldutime;
  31.          }
  32.      }
  33.  
  34. -- 
  35. +------------------------------------------------------------------------+
  36. Andreas Schwab                                      "And now for something
  37. schwab@ls5.informatik.uni-dortmund.de                completely different"
  38. * Linux/Atari is coming real soon now, stay tuned *
  39.